﻿using System;
using System.Collections.Generic;

using Model.Cms;
namespace IDAL.Cms
{
    /// <summary>
    /// 接口层，内容管理，广告
    /// </summary>
    public interface IBlock
    {
        /// <summary>
        /// 新增广告
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        int InsertBlock(BlockInfo info);
        /// <summary>
        /// 修改广告
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool UpdateBlock(BlockInfo info);

        /// <summary>
        /// 删除广告
        /// </summary>
        /// <param name="blockID"></param>
        /// <param name="blockList"></param>
        /// <param name="staffID"></param>
        /// <returns></returns>
        bool DeleteBlock(int blockID, string blockList, int staffID);

        /// <summary>
        /// 获取节点对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        BlockInfo GetBlockByID(int id);

        /// <summary>
        /// 节点列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<BlockInfo> ListBlock(BlockCondition condition);

        /// <summary>
        /// 节点列表
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="recordcount"></param>
        /// <returns></returns>
        IList<BlockInfo> ListBlock(BlockCondition condition, out int recordCount);
    }
}
